The following is an analysis of the Newton client receiving a message which
contained a short text body and had two attached Macintosh files.

The Lotus documentation doesn't quite match what is observed in the analysis
and there are some undocumented segment types for which we need more info.
See section 2.4 below for specific details on the unknown segment type.

Further info on all of the segType/segClass that we will encounter would be
greatly appreciated as would info on whether any other algorithms are ever
used for alternate scrambling schemes.


1	HEADER PORTION
	==============

1.1	Fixed Header (32 bytes)
	------------

	23 05 00 00 84 04 00 00 C0 00 4D 00 01 00 3C 00
	00 00 03 0B 60 00 29 24 0C 00 03 00 08 00 08 00

	Notes:

1.1.1	Are there any other potential message types other than
		"M" and "F" which the Newton client would be expected to
		accept or generate?


1.2	HeadBuff I
	----------

	      seg# TYPE tmpF dura CLAS  length  location

	06 12 0000 0100 0100 7000 0100 00000000 C0000000
	06 12 0000 0100 0200 0100 0000 3C000000 C0000000 - scrambled message body

	06 12 0100 0300 0300 0000 0000 80000000 FC000000 - scrambled data fork (file 1)
	06 12 0100 0300 0400 0000 0200 6C010000 7C010000 - ??? UNDOCUMENTED CLASS 2 ???
	06 12 0100 0300 0500 0000 0100 00000000 E8020000 - empty resource fork (file 1)

	06 12 0200 0300 0600 0000 0000 30000000 E8020000 - scrambled data fork (file 2)
	06 12 0200 0300 0700 0000 0200 6C010000 18030000 - ??? UNDOCUMENTED CLASS 2 ???
	06 12 0200 0300 0800 0000 0100 00000000 84040000 - empty resource fork (file 2)

	Notes:

1.2.1	Segment type 3 seems to indicate a file while the
		Lotus documents indicate that type 3 is "fax"

1.2.2	Type 3 Class 2 seems to contain file info but I haven't
		been able to tell whether it is scrambled the same as
		the other portions (see 2.4.2 below)


1.3	HeadBuff II
	-----------

		01 04 42 6F 62 00                                ..Bob.
		0F 08 65 6E 72 6F 75 74 65 00                    ..enroute.
		07 09 74 68 65 20 74 65 78 74 00                 ..the text.
		03 0A 4C 65 73 20 54 69 74 7A 65 00              ..Les Titze.
		0F 08 65 6E 72 6F 75 74 65 00                    ..enroute.
		0C 0D 4C 65 6E 6E 69 65 20 47 6F 6F 73 65 00     ..Lennie Goose.
		0F 08 65 6E 72 6F 75 74 65 00                    ..enroute.
		07 09 66 69 6C 65 20 6F 6E 65 00                 ..file one.
		07 07 66 69 6C 65 20 32 00                       ..file 2.
		05 2C 55 72 67 65 6E 74 2D 72 65 63 65 69 70 74  .,Urgent-receipt
		   20 72 65 71 75 65 73 74 65 64 20 28 32 20 61    requested (2 a
		   74 74 61 63 68 65 64 20 66 69 6C 65 73 29 00   ttached files).
		0E 00                                            ..
		16 01 02                                         ...
		1D 0C 01 00 00 00 00 00 00 01 00 00 00 00        ..............


2	CONTENT PORTION
	===============

2.1	Segment 0
	---------

	TEXT / ?HILITES? (length == 0)

	Notes:

2.1.1	This type/class (1/1) will be skipped by the Newton client


2.2	Segment 1
	---------

	TEXT / ASCII (length == 60)

	73 20 20 6C 69 20 73 65 6C 54 65 65 74 75 67 20 20 61 66 6E 	s  li selTeetug  afn
	69 68 6F 20 6D 74 58 0D 73 6F 69 70 68 64 61 6D 20 72 63 69 	iho mtX.soiphdam rci
	20 65 65 65 54 0A 77 65 70 53 74 77 72 20 68 70 20 69 45 2E 	 eeeT.wepStwr hp iE.

	Notes:

2.2.1	Standard Lotus 17 position columnar transposed data

2.2.2	<CR> <LF> terminated


2.3	Segment 2
	---------

	FILE / DATA FORK (length == 123)

  Before unscrambling:

	89 9A AB BC CD DE EF 84 95 A6 B7 C8 D9 EA FB 85
	96 A7 B8 C9 DA EB FC 8D 9E AF C0 D1 E2 F3 8C 9D
	AE BF D0 E1 F2 8B 9C AD BE CF E0 F1 81 92 A3 B4
	C5 D6 E7 F8 87 98 A9 BA CB DC ED FE 8A 9B AC BD
	CE DF F0 83 94 A5 B6 C7 D8 E9 FA 82 93 A4 B5 C6
	D7 E8 F9 90 A1 B2 C3 D4 E5 F6 88 99 AA BB CC DD
	EE FF 8F A0 B1 C2 D3 E4 F5 80 91 A2 B3 C4 D5 E6
	F7 8E 9F B0 C1 D2 E3 F4 86 97 A8 B9 CA DB EC FD

	Notes:

2.3.1	Source file was a 128 byte linear sequence of 0x81, 0x82 ... 0xFE, 0xFF

2.3.2	Uses standard Lotus 17 position columnar transposition

2.3.3	After unscrambling, the data matches the source file.


2.4	Segment 3		<<<<<======== BIG UNKNOWN HERE ===============
	---------

	FILE / ?? INFO ?? (length == 364)

  After unscrambling with standard Lotus 17 position
  columnar transposition:

	00 FF 36 FF 00 FF 00 FF 01 80 00 E0 FF 06 E9 00		..6.............
	3F 2A FE FB FF FE FE 00 98 00 01 C0 C0 FE 00 70		?*.............p
	00 FF 09 1F AA FF 01 80 00 0E 40 86 07 06 7F 80		..........@.....
	00 00 FF 00 FF 06 B0 FF A8 00 02 A2 3A FF E0 FF		............:...
	01 00 00 FE 00 FF 01 06 FF 06 00 80 00 0B FF FC		................
	FF FF 00 00 01 00 FE FF 1E FE 36 4E 06 00 00 FE		..........6N....
	FF 01 FF 00 00 FF 7F 01 FF EA FF 1B AC 07 18 06		................
	FF F0 06 FE 00 00 8C 00 80 FE 06 FF 00 00 FF 67		...............g
	01 FF 0F 1B FF 6B 00 0D AC 01 7F 3F FF 06 00 FF		.....k.....?....
	00 FF FF FF 0D FF 0A 00 06 DD 0F FF 80 FF 01 A9		................
	FE AE FF 01 FF 00 FF 00 00 80 01 EA FF FF 01 FF		................
	00 1F 00 FE 80 FE 86 E0 00 74 86 00 06 FE FC 06		.........t......
	FF 00 FF 00 7F EA 7F 01 07 00 00 01 3E C1 01 0F		............>...
	1B FE 00 FF 05 FF 06 FF FF FE 40 C0 FF 00 FC FE		..........@.....
	FF 0D 7F 00 FE FF FF 6C 01 FF C0 00 00 FF 00 FF		.......l........
	1D FF AA FF 00 03 58 FE 36 FE FE 86 00 7F FE E5		......X.6.......
	E0 05 FE 06 FF 00 01 00 01 00 0D 3F FC 00 00 1F		...........?....
	6B 07 00 0F 00 FE 02 7E A2 80 FC 06 FF 80 AE 00		k......~........
	FF 00 FF 06 FF FF 01 FE 60 00 C0 01 AA FF FF 00		........`.......
	01 FF 00 FF 01 00 FF F8 01 86 00 86 FF 06 FE F8		................
	00 55 FE 00 FE FF 80 FE 60 80 E7 00 74 FF 01 C0		.U......`...t...
	0F 62 00 01 00 FF FF 00 3F 06 3E 8E 00 F3 FE FF		.b......?.>.....
	03 FF 01 00 83 00 FF FE 06 FF 6F 00            		..........o.

	Notes:

2.4.1	Source file specs were:
			128 byte data fork
			0 byte resource fork
			creator 'pkgX'
			type 'bkNU'
			created Nov 3/96 12:20:15 PM
			modified Nov 3/96 12:20:15 PM
			no Mac Finder flags set

2.4.2	It is apparent that the bytes for the file creator and type are
		contained within this data block but it has no rhyme or reason!
		There must be some data structure and scrambling method which
		is used for this segment type/class (3/2)

2.4.3	Since I'll have to be able to both create and interpret these data
		structures to handle enclosures, this information is a must.


2.5	Segment 4
	---------

	FILE / RESOURCE FORK (length == 0)

	Notes:

2.5.1	This type/class (3/1) will be skipped by the Newton client


2.6	Segment 5
	---------

	- same as above:  2.3 - Segment 2


2.7	Segment 6
	---------

	- same as above:  2.4 - Segment 3


2.8	Segment 7
	---------

	- same as above:  2.5 - Segment 4
